﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TotalCrytography
{
    public partial class NewFolderGUI : Form
    {
        static string m_folderName;

        public string GetFolderName()
        {
            return m_folderName;
        }

        public NewFolderGUI()
        {
            InitializeComponent();
        }

        private void Init()
        {
            txtNewFolder.SelectAll();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btnCreate_Click(object sender, EventArgs e)
        {
            m_folderName = txtNewFolder.Text;
            this.DialogResult = DialogResult.OK;
            Close();
        }

        private void txtNewFolder_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                btnCreate_Click(null, null);
        }
    }
}
